//@author A0083782W

//Singleton protocal
//CallDueEvent is called every fixed time to call all the event that should be remined to the user
//use trigger to the call all the events  
#pragma once
#include "CommonDataType.h"
#include "EventStorage.h"
#include "Operations.h"

using namespace CommonDataType;

class CallDueEvents{
private:
	vector<pos_int> _availableIndex;
	EventVector const * _readStorage;
	Time _currentDay;
	vector<pos_int> _dueQueue;
	CallDueEvents();

public:
	//check if the list is empty
	bool notEmpty();

	//To specify all the entries to be reminded
	void operator= (const vector<pos_int>& rightOperand);
	
	//each tigger will cause the class to check again
	void trigger();

	//only instance get
	static CallDueEvents& get();
	
	//Get the storage index of the current due events.
	pos_int deQueue();
};

